<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class PlaceOrder extends Model
{
    public function setProcessImgAttribute($image)
    {
        if (is_array($image)) {
            $this->attributes['process_img'] = json_encode($image);
        }
    }

    public function setQuestionImgAttribute($image)
    {
        if (is_array($image)) {
            $this->attributes['question_img'] = json_encode($image);
        }
    }

    public function getProcessImgAttribute($image)
    {
        return json_decode($image, true);
    }

    public function getQuestionImgAttribute($image)
    {
        return json_decode($image, true);
    }
}
